package com.ehsy.service;

import com.dtflys.forest.annotation.Address;
import com.dtflys.forest.annotation.Get;
import com.dtflys.forest.annotation.Query;
import com.dtflys.forest.callback.OnLoadCookie;
import com.dtflys.forest.callback.OnSaveCookie;
import com.dtflys.forest.http.ForestResponse;
import com.ehsy.common.ResponseVo;
import com.ehsy.model.UserInfo;
import org.springframework.stereotype.Component;

/**
 * @author YanZhen_Li
 * @version 1.0
 * @title CookieService
 * @description
 * @create 2024/6/19 15:02
 */
@Component
@Address(host = "127.0.0.1", port = "8080")
public interface CookieService {
    /**
     * 模拟从服务器获取cookie
     */
    @Get("/test/setCookie")
    ForestResponse<String> test1(OnSaveCookie onSaveCookie);

    /**
     * 模拟向服务器传递cookie，并返回传递的cookie以验证是否传递成功
     */
    @Get("/test/getCookie")
    ForestResponse<String>  test2(OnLoadCookie onLoadCookie);
}
